#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
	int power;
	double price_1=0.4463;
	double price_2=0.4663;
	double price_3=0.5663;
	double total;
	cin>>power;
	if (power<=150)
	{
		total = price_1 * power;
	}
	else if (power>150 && power<=400)
	{
		total = 150 * price_1 + price_2 * (power-150);
	}
	else
	{
		total = 150 * price_1 + price_2 * 250 + price_3 * (power-400);
	}
	cout<<setprecision(1)<<setiosflags(ios::fixed)<<total<<endl;
	return 0;
}
